package java_09_13;

import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/*
 输出1900年到现在所有的闰年
*/
public class Test_4 {
    public static void main(String[] args) {
        Calendar c=Calendar.getInstance();
       Calendar c1=Calendar.getInstance();
       c1.set(Calendar.YEAR,1900);
        int i=1900;
        while (i<c.get(Calendar.YEAR)){
            if (c1.getActualMaximum(Calendar.DAY_OF_YEAR)==366){
                System.out.println(i);
            }
            c1.add(Calendar.YEAR,1);
            i++;
        }
    }
}
